package cn.monkey.transport.mq.redisson;

import org.redisson.client.codec.Codec;

public class RedissonTransportConfig {
    private boolean inverse;
    private Inbound inbound = new Inbound();
    private Outbound outbound = new Outbound();

    public Inbound getInbound() {
        return inbound;
    }

    public void setInbound(Inbound inbound) {
        this.inbound = inbound;
    }

    public Outbound getOutbound() {
        return outbound;
    }

    public void setOutbound(Outbound outbound) {
        this.outbound = outbound;
    }

    public static class Inbound {
        private String topic;
        private Codec codec;
        private int pollSize = 10;

        private int pollFrequencyMs = 100;

        public String getTopic() {
            return topic;
        }

        public void setTopic(String topic) {
            this.topic = topic;
        }

        public int getPollSize() {
            return pollSize;
        }

        public void setPollSize(int pollSize) {
            this.pollSize = pollSize;
        }

        public int getPollFrequencyMs() {
            return pollFrequencyMs;
        }

        public void setPollFrequencyMs(int pollFrequencyMs) {
            this.pollFrequencyMs = pollFrequencyMs;
        }

        public Codec getCodec() {
            return codec;
        }

        public void setCodec(Codec codec) {
            this.codec = codec;
        }
    }

    public static class Outbound {
        private String topic;
        private int cacheSize = 10;
        private Codec codec;

        public String getTopic() {
            return topic;
        }

        public void setTopic(String topic) {
            this.topic = topic;
        }

        public int getCacheSize() {
            return cacheSize;
        }

        public void setCacheSize(int cacheSize) {
            this.cacheSize = cacheSize;
        }

        public Codec getCodec() {
            return codec;
        }

        public void setCodec(Codec codec) {
            this.codec = codec;
        }
    }


    public boolean isInverse() {
        return inverse;
    }

    public void setInverse(boolean inverse) {
        this.inverse = inverse;
    }
}
